<template>
    <swiper>
        <div v-for="(item, index) in banners" :key="index" class="swiper-slide">
            <a :href="item.link">
                <img :src="item.image" alt="" @load="imgLoad">
            </a>
        </div>
    </swiper>
</template>


<script>
import Swiper from 'components/common/swiper/Swiper'

export default {
    components: {
        Swiper
        
    },
    props: {
        banners: {
            type: Array,
            default() {
                return []
            }
        }
      },
      data() {
        return {
            isLoad: false,
        }
      },
      methods: {
        imgLoad() {
            if (!this.isLoad) {
                // console.log(this.isLoad)
            this.$emit('swiperImgLoad')
            this.isLoad = true
            }
            
        }
     }
}
</script>


<style scoped>

</style>